package com.xy.controller;


import com.xy.entity.Emp;
import com.xy.service.IEmpService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author zhouzhou
 * @since 2024-04-15
 */
@RestController
@RequestMapping("/emp")
public class EmpController {
    @Autowired
    private IEmpService iEmpService;
    @PostMapping("/list")
    @ApiOperation("新增员工")
    public  void add(@RequestBody Emp emp){
        iEmpService.save(emp);
    }
}
